package com.example.activiti.controller;

import com.example.activiti.common.core.domain.AjaxResult;
import com.example.activiti.service.IFormHistoryDataService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 */
@RestController
public class HistoryFormDataController {

    @Resource
    private IFormHistoryDataService formHistoryDataService;

    /**
     * 1.根据businessKey获取流程历史数据
     *
     * @param businessKey 实例ID
     * @return 任务历史数据
     */
    @GetMapping(value = "historyFromData/{businessKey}")
    public AjaxResult historyFromData(@PathVariable("businessKey") String businessKey) {
        return AjaxResult.success(formHistoryDataService.historyDataShow(businessKey));

    }
}
